#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, K;
string s;
vector<vector<ll>> dp; 
vector<vector<ll>> num;
ll calculate_num(int i, int j) {
    ll res = 0;
    for (int k = i; k <= j; k++) {
        res = res * 10 + (s[k-1] - '0'); 
    }
    return res;
}

int main() {
    cin >> N >> K;
    cin >> s;
    num.resize(N+1, vector<ll>(N+1, 0));
    for (int i = 1; i <= N; i++) {
        for (int j = i; j <= N; j++) {
            num[i][j] = calculate_num(i, j);
        }
    }
    dp.resize(N+1, vector<ll>(K+1, 0));
    for (int i = 1; i <= N; i++) {
        dp[i][0] = num[1][i];
    }
    for (int j = 1; j <= K; j++) {
        for (int i = j+1; i <= N; i++) {
            for (int k = j; k < i; k++) {
                dp[i][j] = max(dp[i][j], dp[k][j-1] * num[k+1][i]);
            }
        }
    }

    cout << dp[N][K] << endl;

    return 0;
}